package org.example.object.notify2;
public class Consumer {
    private final Buffer buffer;

    public Consumer(Buffer buffer) {
        this.buffer = buffer;
    }

    public void consume() {
        int value = buffer.take();
        System.out.println("Consumed: " + value);
    }
}
